This README documents a practical, low‑noise workflow to recon and lightly test a Laravel web app from Kali Linux. It’s built to catch the most common misconfigurations and exposures (e.g., .env, Debugbar, Ignition, Telescope/Horizon) and to produce actionable reports you can hand to engineering.
Scope & Ethics
- Only test assets you own or have explicit written authorization for.
- Keep scans conservative: avoid brute‑force, high‑risk payloads, or DoS‑like behavior.
- Default target in examples:
a.com. Replace with your domain.
Kali usually ships most tools, but confirm/install if needed:
sudo apt update
sudo apt install -y whatweb wafw00f nmap nikto nuclei feroxbuster httpxTLS tester (if missing on your box):
# Optional if not already available
git clone https://github.com/drwetter/testssl.sh.git ~/tools/testssl.sh
sudo ln -sf ~/tools/testssl.sh/testssl.sh /usr/local/bin/testssl.shSubdomain & URL helpers (optional but useful):
# httpx is already installed above
# gau (GetAllURLs) and anew (dedupe) - optional
go install github.com/lc/gau/v2/cmd/gau@latest
go install github.com/tomnomnom/anew@latest
# Ensure $GOPATH/bin is in PATH, e.g.:
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bashrc && source ~/.bashrcOWASP ZAP (GUI) is preinstalled on Kali; if not:
sudo apt install -y zaproxyexport DOMAIN="a.com" # <- change to your domain
export TARGET="https://$DOMAIN"
mkdir -p ~/recon/$DOMAIN && cd ~/recon/$DOMAINwhatweb -v $TARGET
wafw00f $TARGET
nmap -Pn -p 80,443 --script http-security-headers,ssl-enum-ciphers $DOMAIN
testssl.sh -U --sneaky $DOMAINWhat to look for
- Missing HSTS / CSP / X-Frame-Options / X-Content-Type-Options ⇒ server hardening needed.
- Weak ciphers / outdated TLS ⇒ upgrade TLS config.
amass enum -d $DOMAIN -o subs.txt
httpx -l subs.txt -ports 80,443,8080,8443 -status-code -title -server -o live-hosts.txtWhy this matters
- Admin panels or staging services sometimes leak on subdomains.
feroxbuster -u $TARGET -k -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php,js,css,zip,sql,env,log,txt -o ferox.txtCheck common Laravel-sensitive paths quickly:
for p in /.env /storage/logs/laravel.log /vendor/composer/installed.json /composer.json /.git/HEAD /_debugbar /_ignition/execute-solution /telescope /horizon /.env.example ; do
echo ">>> $p"; curl -k -s -I "$TARGET$p" | head -n 1
doneAny 200/302 here is a red flag (especially .env, Debugbar, Ignition, Telescope/Horizon).
nuclei -u $TARGET -tags "php,laravel,misconfig,exposure" -severity low,medium,high,critical -o nuclei.txtNuclei templates commonly catch:
.envexposures- Debugbar / Ignition (CVE‑2021‑3129 if debug+Ignition)
- Telescope / Horizon panels
- Common misconfigurations
Note: If an Ignition RCE path is found, prioritize remediation immediately.
nikto -h $TARGET -ssl -o nikto.txtCatches default files, backups, dangerous methods, etc.
Aggregate URLs and parameters (multiple sources improve coverage):
# Gather URLs (from prior outputs and historical sources if gau is installed)
cat ferox.txt live-hosts.txt 2>/dev/null | grep -Eo 'https?://[^ ]+' | sort -u > urls.txt
gau --subs $DOMAIN | tee -a urls.txt # optional
cat urls.txt | grep '?' | anew params.txt # requires anew (optional)Light SQLMap run (conservative):
sqlmap -m params.txt --batch --random-agent --level=2 --risk=1 --threads=2 --dbms=mysqlStart with specific, meaningful targets; don’t blast the whole site.
- Launch ZAP → Quick Scan on
$TARGET. - Generate an HTML report (baseline/passive first; avoid aggressive active scans initially).
- Triage the alerts by confidence and risk.
- Auth/Session/CSRF
- All POST endpoints require CSRF tokens.
- Cookies set
Secure,HttpOnly,SameSite=Lax|Strict.
- Rate limiting
- Login/OTP/Password reset throttle (e.g., 5–10 failed attempts ⇒ delay/lockout).
- File Uploads
- Enforce allowlist; store under non-executable paths (e.g.,
/storage); verify content-type and magic bytes.
- Enforce allowlist; store under non-executable paths (e.g.,
- IDOR/Access Control
- Change resource IDs and confirm robust authorization checks.
- Debug/Logs
- No debug info in responses; log level appropriate; no sensitive logs exposed via web.
Laravel / App
APP_ENV=productionandAPP_DEBUG=false- Rotate a strong
APP_KEY; invalidate old sessions as needed - Lock down
/telescopeand/horizonbehind auth/VPN/IP allowlists - Remove/disable Debugbar in production
- Keep framework & packages up to date (update in dev; deploy via CI/CD)
- Move public uploads outside webroot or disable execution in upload paths
- Run:
php artisan config:cache route:cache view:cachein CI
Web Server / Headers
- HSTS (with preload after validation), CSP (start simple), X-Frame-Options (SAMEORIGIN), X-Content-Type-Options (nosniff), Referrer-Policy, Permissions-Policy
- Deny dotfiles and directory listing
- Nginx
location ~ /\.(?!well-known).* { deny all; } autoindex off;
- Apache
RedirectMatch 404 /\..* Options -Indexes
- Nginx
Use the helper script to run a minimal baseline and collect outputs into a timestamped folder.
#!/usr/bin/env bash
set -e
DOMAIN="${1:-a.com}"
TARGET="https://$DOMAIN"
WD="$HOME/recon/$DOMAIN/quick-$(date +%F-%H%M)"
mkdir -p "$WD"; cd "$WD"
echo "[*] Target: $TARGET"
echo "[*] WhatWeb / WAF / Headers"
whatweb -v $TARGET | tee whatweb.txt
wafw00f $TARGET | tee waf.txt
nmap -Pn -p 80,443 --script http-security-headers,ssl-enum-ciphers $DOMAIN | tee nmap.txt
echo "[*] Sensitive Laravel endpoints"
ENDPOINTS=(/.env /storage/logs/laravel.log /vendor/composer/installed.json /composer.json /.git/HEAD /_debugbar /_ignition/execute-solution /telescope /horizon)
for p in "${ENDPOINTS[@]}"; do
code=$(curl -k -s -o /dev/null -w "%{http_code}" "$TARGET$p")
echo "$code $p" | tee -a laravel_sensitive.txt
done
echo "[*] Nuclei (misconfig/exposures/php)"
nuclei -u $TARGET -tags "php,laravel,misconfig,exposure" -severity low,medium,high,critical -o nuclei.txt || true
echo "[*] Nikto"
nikto -h $TARGET -ssl -o nikto.txt
echo "[*] Dir brute (feroxbuster)"
feroxbuster -u $TARGET -k -x php,js,css,zip,sql,env,log,txt -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -o ferox.txt || true
echo "[*] Done. Reports in $WD"Run it:
chmod +x quick_laravel_check.sh
./quick_laravel_check.sh yourdomain.comOutputs will be under: ~/recon/<domain>/quick-YYYY-MM-DD-HHMM/
- Prioritize criticals (e.g.,
.envexposed, Ignition debug endpoints, open admin panels). - Apply hardening (Laravel + server headers) from the checklist.
- Re-run the quick script and confirm deltas are resolved.
- Consider a follow-up authenticated test for authorization/IDOR and business-logic issues.
# Remove recon folder if needed (irreversible)
rm -rf ~/recon/$DOMAINx:m7mdatd Mohammed Almawi
This workflow is provided “as-is” without warranty of any kind. Use responsibly and within the law.